﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ApprovalListPage.aspx.cs" Inherits="KPI_SYSTEM.ApprovalPage.ApprovalListPage" %>

<!DOCTYPE html>
<html>
<head runat="server">
    <title></title>
    <style>
        
    </style>
</head>
<body>
    <form id="form1" runat="server">
        <f:PageManager ID="PageManager1" runat="server" />
        <f:Form ID="Form2" IsFluid="true" CssClass="blockpanel" BodyPadding="5 5 0 5" LabelAlign="Left" ShowHeader="false"
            Title="查询" runat="server">
            <Rows>
                <f:FormRow ColumnWidths="15% 15% 15% 15% 15% 15%">
                    <Items>
                        <f:DropDownList ID="ddlSearchPROCESS_RESULT" Width="150px" Label="审批状态" AutoSelectFirstItem="true" runat="server">
                            <f:ListItem Text="待审核" Value="0" />
                            <f:ListItem Text="已通过" Value="1" />
                            <f:ListItem Text="已驳回" Value="2" />
                        </f:DropDownList>
                        <f:DropDownList ID="ddlSearchSUB_DEPT" Width="150px" Label="提交部门" AutoSelectFirstItem="true" runat="server">
                        </f:DropDownList>
                        <f:Button ID="btnSearch" Text="搜索" Icon="Magnifier" runat="server" OnClick="btnSearch_Click"></f:Button>
                    </Items>
                    <Items>
                    </Items>
                </f:FormRow>
            </Rows>
        </f:Form>
        <f:Grid ID="Grid1" IsFluid="true" CssClass="blockpanel" ShowBorder="true" ShowHeader="true" EnableCollapse="false"
            runat="server" DataKeyNames="REC_ID" AllowCellEditing="false" PageSize="15" AllowPaging="true"
            DataIDField="REC_ID" Title="审批信息列表">
            <Toolbars>
                <f:Toolbar ID="Toolbar2" Position="Top" runat="server">
                    <Items>
                        <f:Button ID="btnEditApprovalMessage" Text="编辑审批信息" Icon="TextListBullets"
                            EnablePostBack="true" DisableControlBeforePostBack="false" runat="server" OnClick="btnEditApprovalMessage_Click">
                        </f:Button>
<%--                        <f:Button ID="btnDownTemplate" Text="下载" Icon="TextListBullets"
                            EnablePostBack="true" DisableControlBeforePostBack="false" runat="server" OnClick="btnEditApprovalMessage_Click">
                        </f:Button>--%>
                    </Items>
                </f:Toolbar>
            </Toolbars>
            <Columns>
                <f:RenderField Width="100px" Hidden="true" ColumnID="PROCESS_SEQ" DataField="PROCESS_SEQ"
                    HeaderText="流程顺序ID">
                </f:RenderField>
                <f:RenderField Width="100px" ColumnID="SUB_DEPT_NAME" DataField="SUB_DEPT_NAME"
                    HeaderText="提交部门">
                </f:RenderField>
                <f:RenderField Width="150px" ColumnID="APPROVAL_CONTENT" DataField="APPROVAL_CONTENT"
                    HeaderText="提交内容">
                </f:RenderField>
                <f:RenderField Width="150px" ColumnID="CREATE_TIME" DataField="CREATE_TIME"
                    HeaderText="提交时间">
                </f:RenderField>
                <f:RenderField Width="150px" ColumnID="PROCESS_TYPE_NAME" DataField="PROCESS_TYPE_NAME"
                    HeaderText="审批步骤">
                </f:RenderField>
                <f:RenderField Width="100px" ColumnID="PROCESS_RESULT_NAME" DataField="PROCESS_RESULT_NAME"
                    HeaderText="审批状态">
                </f:RenderField>
                <f:RenderField Width="150px" ColumnID="PROCESS_OPINION" DataField="PROCESS_OPINION"
                    HeaderText="审批意见">
                </f:RenderField>
                <f:RenderField Hidden="true" ColumnID="APPROVAL_ID" DataField="APPROVAL_ID"
                    HeaderText="流程主ID">
                </f:RenderField>
                <f:RenderField Hidden="true" ColumnID="PROCESS_ID" DataField="PROCESS_ID"
                    HeaderText="子流程ID">
                </f:RenderField>
                <f:RenderField Hidden="true" ColumnID="APPROVAL_DATA_ID" DataField="APPROVAL_DATA_ID"
                    HeaderText="流程数据ID">
                </f:RenderField>
                <f:RenderField Hidden="true" ColumnID="SUB_DEPT" DataField="SUB_DEPT"
                    HeaderText="提交部门ID">
                </f:RenderField>
                <f:RenderField Hidden="true" ColumnID="SUB_USER" DataField="SUB_USER"
                    HeaderText="提交人员ID">
                </f:RenderField>
            </Columns>
        </f:Grid>

        <f:Window ID="Window1" Title="编辑审批信息" Hidden="true" EnableIFrame="false" AutoScroll="true"
            EnableMaximize="true" Target="Self" EnableResize="true" runat="server" BodyPadding="15px"
            IsModal="true" Width="700px">
            <Items>

                <f:GroupPanel runat="server" ID="GroupPanel1" Title="待审信息" Layout="Fit" BoxFlex="1" MinHeight="120">
                    <Items>
                        <f:Form ID="FormApply" ShowBorder="false" ShowHeader="false" runat="server"  Layout="VBox" >
                            <Rows>
                                <f:FormRow runat="server">
                                    <Items>
                                        <f:TextBox ID="tbxFormSUB_DEPT_NAME" Width="310px" Label="申请部门" runat="server" Readonly="true"></f:TextBox>
                                        <f:TextBox ID="tbxFormSUB_USER_NAME" Width="310px" MarginLeft="20px" Label="申请人员" runat="server" Readonly="true"></f:TextBox>
                                    </Items>
                                </f:FormRow>
                                <f:FormRow runat="server">
                                    <Items>
                                        <f:TextBox ID="tbxFormSUB_TIME" Width="310px" Label="申请时间" runat="server" Readonly="true"></f:TextBox>
                                        <f:TextBox ID="tbxFormAPPROVAL_CONTENT" Width="310px" MarginLeft="20px" Label="待审内容" runat="server" Readonly="true"></f:TextBox>
                                    </Items>
                                </f:FormRow>
                            </Rows>
                        </f:Form>
                    </Items>
                    <Items>
                    </Items>
                </f:GroupPanel>
                <f:GroupPanel runat="server" ID="Panel_ApprovalInfo" Title="流程信息" Layout="Fit" BoxFlex="1" MinHeight="120">
                    <Items>
                        <f:Grid ID="GridProcess" runat="server" ShowBorder="true" ShowHeader="false" EnableRowDoubleClickEvent="true" OnRowDoubleClick="GridProcess_RowClick"
                            DataKeyNames="REC_ID" EnableColumnLines="true" EnableRowLines="true">
                            <Columns>
                                <f:BoundField runat="server" ID="PROCESS_SEQ" Hidden="true" ColumnID="PROCESS_SEQ" DataField="PROCESS_SEQ" />
                                <f:BoundField runat="server" ID="PROCESS_DEPT_NAME" ColumnID="PROCESS_DEPT_NAME" DataField="PROCESS_DEPT_NAME" HeaderText="审批部门" HeaderTextAlign="Center" TextAlign="Center" Width="120px" />
                                <f:BoundField runat="server" ID="PROCESS_USER_NAME" ColumnID="PROCESS_USER_NAME" DataField="PROCESS_USER_NAME" HeaderText="审批人员" HeaderTextAlign="Center" TextAlign="Center" Width="120px" />
                                <f:BoundField runat="server" ID="PROCESS_TYPE_NAME" ColumnID="PROCESS_TYPE_NAME" DataField="PROCESS_TYPE_NAME" HeaderText="审批步骤" HeaderTextAlign="Center" TextAlign="Center" Width="100px" />
                                <f:BoundField runat="server" ID="PROCESS_RESULT_NAME" ColumnID="PROCESS_RESULT_NAME" DataField="PROCESS_RESULT_NAME" HeaderText="审批结果" HeaderTextAlign="Center" TextAlign="Center" Width="120px" />
                                <f:BoundField runat="server" ID="PROCESS_OPINION" ColumnID="PROCESS_OPINION" DataField="PROCESS_OPINION" HeaderText="审批意见" HeaderTextAlign="Center" TextAlign="Center" Width="150px" />
                                <f:BoundField runat="server" ID="UPDATE_TIME" ColumnID="UPDATE_TIME" DataField="UPDATE_TIME" HeaderText="审批时间" HeaderTextAlign="Center" TextAlign="Center" Width="150px" />
                                <f:BoundField runat="server" ID="PROCESS_USER" ColumnID="PROCESS_USER" DataField="PROCESS_USER" Hidden="true" />
                            </Columns>
                        </f:Grid>
                    </Items>
                </f:GroupPanel>
                <f:GroupPanel runat="server" ID="Panel_CurrentApproval" Title="当前审批" Layout="Fit" MinHeight="120">
                    <Items>
                        <f:SimpleForm runat="server" ID="DataForm" ShowHeader="false" ShowBorder="false">
                            <Items>
                                 <f:HiddenField ID="hfFormID" runat="server"></f:HiddenField>
                                <f:RadioButtonList ID="rblFormPROCESS_RESULT" Label="审批结果" ColumnNumber="2" runat="server" OnSelectedIndexChanged="rblFormPROCESS_RESULT_SelectedIndexChanged"  AutoPostBack="true">
                                    <f:RadioItem Text="同意" Value="1" />
                                    <f:RadioItem Text="驳回" Value="2" />
                                </f:RadioButtonList>
                            </Items>
                            <Items>
                                <f:TextArea runat="server" Label="审批意见" ID="tbxFormPROCESS_OPINION" />
                            </Items>
                            <Items>
                                <f:Button ID="btnSaveApproval"
                                    Icon="SystemSave" runat="server" OnClick="btnSaveApproval_Click" Text="保存">
                                </f:Button>
                            </Items>
                        </f:SimpleForm>
                    </Items>
                </f:GroupPanel>

            </Items>
        </f:Window>
        <br />
        <br />
        <br />
    </form>
    <script src="../res/js/ApprovalButton.js"></script>
</body>
</html>
